package vn.edu.saigontech.ncms.web.student;

import java.util.Calendar;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.usermodel.HSSFRichTextString;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.util.CellRangeAddress;

import vn.edu.saigontech.ncms.model.info.ReceiptInfo;
import vn.edu.saigontech.ncms.model.info.Student;
import vn.edu.saigontech.ncms.model.program.Level;
import vn.edu.saigontech.ncms.model.program.Program;
import vn.edu.saigontech.ncms.model.result.PlacementTest;
import vn.edu.saigontech.ncms.model.system.Parameter;
import vn.edu.saigontech.ncms.service.LevelService;
import vn.edu.saigontech.ncms.service.ParameterService;
import vn.edu.saigontech.ncms.service.PlacementShiftService;
import vn.edu.saigontech.ncms.service.PlacementTestService;
import vn.edu.saigontech.ncms.service.PlacementTestTypeService;
import vn.edu.saigontech.ncms.service.ProgramService;
import vn.edu.saigontech.ncms.service.ReceiptInfoService;
import vn.edu.saigontech.ncms.service.StudentService;
import vn.edu.saigontech.ncms.service.StudentTypeService;
import vn.edu.saigontech.ncms.service.UserService;
import vn.edu.saigontech.ncms.util.Checker;
import vn.edu.saigontech.ncms.util.DateUtil;
import vn.edu.saigontech.ncms.util.ExcelUtil;
import vn.edu.saigontech.ncms.web.BaseAction;

@SuppressWarnings("serial")
public class PlacementTestAction extends BaseAction {
	
	private Long id;
	private String date;
	private String fromTestDate;
	private String toTestDate;
	private String fromConsultedDate;
	private String toConsultedDate;
	private Long typeId;
	private Double writtenScore;
	private Double speakingScore;
	private Long studentId;
	private String comment;
	private String firstName;
	private String lastName;
	private Long levelId;
	private Long programId;
	private String registerDate;
	private Double fee;
	private Long cashierId;
	private String consultedDate;
	private Long consultantId;
	private Long placementShiftId;
	private Long placementTestTypeId;
	private boolean active;
	
	private Long[] ids;
	private Long[] levelIds;
	private String[] dates;
	private Double[] writtenScores;
	private Double[] speakingScores;

	public String showAdd() {
		Student student = StudentService.INSTANCE.findById(this.studentId);
		if(student.getProgram() == null) {
			REQUEST().setAttribute("programs", ProgramService.INSTANCE.findAllAreActive());
		}
		else {
			REQUEST().setAttribute("programs", Collections.singletonList(student.getProgram()));
		}
		REQUEST().setAttribute("student", student);
		REQUEST().setAttribute("shifts", PlacementShiftService.INSTANCE.findAll());
		REQUEST().setAttribute("types", PlacementTestTypeService.INSTANCE.findAll());
		REQUEST().setAttribute("cashiers", UserService.INSTANCE.findByRole("Consulting"));
		return SUCCESS;
	}
	
	public String add() {
		PlacementTest placementTest = new PlacementTest();
		Student student = StudentService.INSTANCE.findById(this.studentId);
		placementTest.setStudent(student);
		placementTest.setLevel(LevelService.INSTANCE.findById(this.levelId));
		Date testDate = DateUtil.fromString(this.date, this.i18n("format.date"));
		placementTest.setDate(testDate);
		placementTest.setPlacementShift(PlacementShiftService.INSTANCE.findById(this.placementShiftId));
		placementTest.setPlacementTestType(PlacementTestTypeService.INSTANCE.findById(this.placementTestTypeId));
		placementTest.setWrittenScore(this.writtenScore);
		placementTest.setSpeakingScore(this.speakingScore);

		// modified
		placementTest.setFee(this.fee);
		if (this.fee != 0) {
			String number = ReceiptInfoService.INSTANCE.generateReceiptInfoName(ReceiptInfo.XL, "", "", DateUtil.getYear(testDate));
			placementTest.setReceiptNo(number);
		}
		else placementTest.setReceiptNo("");
		// end
		
		if(Checker.isDate(this.registerDate, this.i18n("format.date"))) {
			placementTest.setRegisterDate(DateUtil.fromString(this.registerDate, this.i18n("format.date")));
		}
		placementTest.setCashier(UserService.INSTANCE.findById(this.cashierId));
		placementTest.setComment(this.comment);
		PlacementTestService.INSTANCE.persist(placementTest);
		
		this.addLoggingDetail(BaseAction.ADD, "logging.placement.add", student.getFullName());
		return SUCCESS;
	}
	
	public String info() {
		REQUEST().setAttribute("programs", ProgramService.INSTANCE.findAllAreActive());
		REQUEST().setAttribute("placementTest", PlacementTestService.INSTANCE.findById(this.id));
		REQUEST().setAttribute("shifts", PlacementShiftService.INSTANCE.findAll());
		REQUEST().setAttribute("cashiers", UserService.INSTANCE.findByRole("Consulting"));
		return SUCCESS;
	}
	
	public String edit() {
		PlacementTest placementTest = PlacementTestService.INSTANCE.findById(this.id);
		placementTest.setLevel(LevelService.INSTANCE.findById(this.levelId));
		placementTest.setDate(DateUtil.fromString(this.date, this.i18n("format.date")));
		placementTest.setPlacementShift(PlacementShiftService.INSTANCE.findById(this.placementShiftId));
		placementTest.setPlacementTestType(PlacementTestTypeService.INSTANCE.findById(this.placementTestTypeId));
		placementTest.setWrittenScore(this.writtenScore);
		placementTest.setSpeakingScore(this.speakingScore);
		if(Checker.isDate(this.registerDate, this.i18n("format.date"))) {
			placementTest.setRegisterDate(DateUtil.fromString(this.registerDate, this.i18n("format.date")));
		}
		placementTest.setFee(this.fee);
		placementTest.setCashier(UserService.INSTANCE.findById(this.cashierId));
		placementTest.setActive(this.active);
		placementTest.setComment(this.comment);
		placementTest = PlacementTestService.INSTANCE.persist(placementTest);
		Student student = placementTest.getStudent(); 
		this.studentId = student.getId();
		
		this.addLoggingDetail(BaseAction.EDIT, "logging.placement.edit", student.getFullName());
		return SUCCESS;
	}
	
	public String edits() {
		for(int i = 0; i < this.ids.length; i++) {
			PlacementTest placementTest = PlacementTestService.INSTANCE.findById(this.ids[i]);
			placementTest.setLevel(LevelService.INSTANCE.findById(this.levelIds[i]));
			placementTest.setDate(DateUtil.fromString(this.dates[i], this.i18n("format.date")));
			placementTest.setWrittenScore(this.writtenScores[i]);
			placementTest.setSpeakingScore(this.speakingScores[i]);
			PlacementTestService.INSTANCE.persist(placementTest);
		}
		this.addLoggingDetail(BaseAction.EDIT, "logging.placement.edits");
		return NONE;
	}
	
	public String list() {
		Student student = StudentService.INSTANCE.findById(this.studentId);
		if(student.getPlacementTests().isEmpty())
			return ADD;
		REQUEST().setAttribute("student", student);
		return SUCCESS;
	}
	
	public String report() {
		PlacementTest placement = PlacementTestService.INSTANCE.findById(this.id);
		REQUEST().setAttribute("placementTest", placement);
		
		this.addLoggingDetail(BaseAction.REPORT, "logging.placement.report", placement.getStudent().getFullName());
		return SUCCESS;
	}

	public String delete() {
		Student student = PlacementTestService.INSTANCE.findById(this.id).getStudent();
		this.studentId = student.getId();
		if(PlacementTestService.INSTANCE.deleteById(this.id)) {
			this.addLoggingDetail(BaseAction.DELETE, "logging.placement.delete", student.getFullName());
			return SUCCESS;
		}
		this.setKeyMessage("confirm.deleteUnsuccessfully", "placementTest");
		return ERROR;
	}
	
	public String showSearch() {
		Set<Level> levels = new HashSet<Level>();
		if(Checker.isNotNull(this.programId)) {
			Program program = ProgramService.INSTANCE.findById(this.programId);
			REQUEST().setAttribute("searchProgram", program);
			levels = program.getLevels();
		}
		REQUEST().setAttribute("levels", levels);
		REQUEST().setAttribute("types", StudentTypeService.INSTANCE.findAll());
		REQUEST().setAttribute("programs", ProgramService.INSTANCE.findAllAreActive());
		REQUEST().setAttribute("shifts", PlacementShiftService.INSTANCE.findAll());
		REQUEST().setAttribute("consultants", UserService.INSTANCE.findAllByRole("Consulting"));
		return SUCCESS;
	}
	
	public String search() {
		PlacementTest placementTest = PlacementTestService.INSTANCE.createBlankPlacementTest();
		placementTest.getStudent().setFirstName(this.firstName);
		placementTest.getStudent().setLastName(this.lastName);
		placementTest.getStudent().getType().setId(this.typeId);
		placementTest.getStudent().setFromConsultedDate(DateUtil.fromString(this.fromConsultedDate, this.i18n("format.date")));
		placementTest.getStudent().setToConsultedDate(DateUtil.fromString(this.toConsultedDate, this.i18n("format.date")));
		placementTest.getStudent().getProgram().setId(this.programId);
		placementTest.getLevel().setId(this.levelId);
		placementTest.setDate(DateUtil.fromString(this.date, this.i18n("format.date")));
		placementTest.setPlacementShift(PlacementShiftService.INSTANCE.findById(this.placementShiftId));
		placementTest.setFromTestDate(DateUtil.fromString(this.fromTestDate, this.i18n("format.date")));
		placementTest.setToTestDate(DateUtil.fromString(this.toTestDate, this.i18n("format.date")));
		placementTest.getStudent().setConsultedDate(DateUtil.fromString(this.consultedDate, this.i18n("format.date")));
		placementTest.getStudent().getConsultant().setId(this.consultantId);
		SESSION().setAttribute("searchPlacementTest", placementTest);
		
		this.addLoggingDetail(BaseAction.SEARCH, "logging.placement.search");
		return SUCCESS;
	}
	
	public String showCacheSearchResult() {
		PlacementTest placementTest = (PlacementTest) SESSION().getAttribute("searchPlacementTest");
		if(Checker.isNull(placementTest))
			placementTest = PlacementTestService.INSTANCE.createBlankPlacementTest();
		Collection<PlacementTest> placementTests = PlacementTestService.INSTANCE.find(placementTest);
		REQUEST().setAttribute("programs", ProgramService.INSTANCE.findAll());
		REQUEST().setAttribute("shifts", PlacementShiftService.INSTANCE.findAll());
		REQUEST().setAttribute("placementTests", placementTests);
		return SUCCESS;
	}
	
	public String showDetail() {
		REQUEST().setAttribute("placementTest", PlacementTestService.INSTANCE.findById(this.id));
		return SUCCESS;
	}
	
	public String print() {
		PlacementTest placement = PlacementTestService.INSTANCE.findById(this.id);
		REQUEST().setAttribute("placement", placement);
		return SUCCESS;
	}
	
	public String showDailyReportForm() {
		this.date = DateUtil.toString(DateUtil.newDate(), this.i18n("format.date"));
		return SUCCESS;
	}
	
	public String reportDaily() {
		Date dateDate = DateUtil.fromString(this.date, this.i18n("format.date"));
		int day = DateUtil.getField(dateDate, Calendar.DAY_OF_MONTH);
		int month = DateUtil.getField(dateDate, Calendar.MONTH);
		int year = DateUtil.getField(dateDate, Calendar.YEAR);
		
		List<PlacementTest> placements = PlacementTestService.INSTANCE.findByDate(dateDate, dateDate);
		
		String drpt = ParameterService.INSTANCE.findText(Parameter.DRPT);
		
		RESPONSE().setContentType("application/vnd.ms-excel");
		RESPONSE().setHeader("Content-disposition","attachment; filename=\""+ "PlacementTest Daily Report - " + (month + 1) + ".xls\"");
		
		try {
			HSSFWorkbook workbook = new HSSFWorkbook();
			HSSFSheet sheet = workbook.createSheet("Report");

			HSSFFont fontBold16 = ExcelUtil.makeFont(workbook, "Times New Roman", 16, true);
			HSSFFont fontBold12 = ExcelUtil.makeFont(workbook, "Times New Roman", 12, true);
			HSSFFont fontBold11 = ExcelUtil.makeFont(workbook, "Times New Roman", 11, true);
			
			HSSFFont fontNormal12 = ExcelUtil.makeFont(workbook, "Times New Roman", 12, false);
			HSSFFont fontNormal11 = ExcelUtil.makeFont(workbook, "Times New Roman", 11, false);
			
			HSSFCellStyle styleCenter_B16 = ExcelUtil.makeCellStyle(workbook, HSSFCellStyle.ALIGN_CENTER, HSSFCellStyle.VERTICAL_CENTER, fontBold16);
			HSSFCellStyle styleCenter_B12 = ExcelUtil.makeCellStyle(workbook, HSSFCellStyle.ALIGN_CENTER, HSSFCellStyle.VERTICAL_CENTER, fontBold12);
			HSSFCellStyle styleCenter_B11 = ExcelUtil.makeCellStyle(workbook, HSSFCellStyle.ALIGN_CENTER, HSSFCellStyle.VERTICAL_CENTER, fontBold11);
			
			HSSFCellStyle styleCenter_B12_Numberic = ExcelUtil.makeCellStyle(workbook, HSSFCellStyle.ALIGN_CENTER, HSSFCellStyle.VERTICAL_CENTER, fontBold12);
			styleCenter_B12_Numberic.setDataFormat(workbook.createDataFormat().getFormat("#,##0"));
			
			HSSFCellStyle styleCenter_N12 = ExcelUtil.makeCellStyle(workbook, HSSFCellStyle.ALIGN_CENTER, HSSFCellStyle.VERTICAL_CENTER, fontNormal12);
			HSSFCellStyle styleCenter_N11 = ExcelUtil.makeCellStyle(workbook, HSSFCellStyle.ALIGN_CENTER, HSSFCellStyle.VERTICAL_CENTER, fontNormal11);
			HSSFCellStyle styleLeft_N11 = ExcelUtil.makeCellStyle(workbook, HSSFCellStyle.ALIGN_LEFT, HSSFCellStyle.VERTICAL_CENTER, fontNormal11);
			HSSFCellStyle styleRight_N11 = ExcelUtil.makeCellStyle(workbook, HSSFCellStyle.ALIGN_RIGHT, HSSFCellStyle.VERTICAL_CENTER, fontNormal11);
			styleRight_N11.setDataFormat(workbook.createDataFormat().getFormat("#,##0"));
			
			int r = 0;
			HSSFRow row = sheet.createRow(r);
			
			HSSFCell cell = row.createCell(0, HSSFCell.CELL_TYPE_STRING);
			cell.setCellStyle(styleCenter_B16);
			row.setHeightInPoints(21);
			cell.setCellValue(new HSSFRichTextString("BẢNG KÊ CHI TIẾT NỘP TIỀN THI XẾP LỚP THÁNG " + (month + 1) + "/" + year));
			sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 10));
			
			r = r + 1;
			row = sheet.createRow(r);
			row.setHeightInPoints(16);
			cell = row.createCell(0, HSSFCell.CELL_TYPE_STRING);
			cell.setCellStyle(styleCenter_B12);
			cell.setCellValue(new HSSFRichTextString("Cơ Sở: Quang Trung"));
			sheet.addMergedRegion(new CellRangeAddress(r, r, 0, 10));
			
			r = r + 1;
			row = sheet.createRow(r);
			row.setHeightInPoints(16);
			cell = row.createCell(0, HSSFCell.CELL_TYPE_STRING);
			cell.setCellStyle(styleCenter_N12);
			cell.setCellValue(new HSSFRichTextString("Ngày " + DateUtil.toString(dateDate, "dd/MM/yyyy")));
			sheet.addMergedRegion(new CellRangeAddress(r, r, 0, 10));
			
			// BLANK
			r = r + 1;
			row = sheet.createRow(r);
			
			r = r + 1;
			row = sheet.createRow(r);
			row.setHeightInPoints(18);
			
			ExcelUtil.makeColumnLabel(workbook, sheet, row, 0, "STT", 256*5, styleCenter_B11);
			ExcelUtil.makeColumnLabel(workbook, sheet, row, 1, "NGÀY", 256*11, styleCenter_B11);
			ExcelUtil.makeColumnLabel(workbook, sheet, row, 2, "SỐ BIÊN LAI", 256*16, styleCenter_B11);
			ExcelUtil.makeColumnLabel(workbook, sheet, row, 3, "HỌ TÊN", 256*30, styleCenter_B11);
			ExcelUtil.makeColumnLabel(workbook, sheet, row, 4, "SỐ TIỀN", 256*15, styleCenter_B11);
			ExcelUtil.makeColumnLabel(workbook, sheet, row, 5, "GHI CHÚ", 256*25, styleCenter_B11);
			ExcelUtil.makeColumnLabel(workbook, sheet, row, 6, "NGƯỜI THU", 256*12, styleCenter_B11);
			
			int firstRow = r + 2;
			int index = 1;
			
			for(PlacementTest placementTest : placements) {
				r = r + 1;
				row = sheet.createRow(r);
				row.setHeightInPoints(18);
				
				cell = row.createCell(0, HSSFCell.CELL_TYPE_NUMERIC);
				cell.setCellStyle(styleCenter_N11);
				cell.setCellValue(index);
				
				Date date = placementTest.getDate();
				String value = DateUtil.getDayOfMonth(date) + "-" + DateUtil.getMonthAsString(date) + "-" + new String(year + "").substring(2, 4);
				
				cell = row.createCell(1, HSSFCell.CELL_TYPE_STRING);
				cell.setCellStyle(styleCenter_N11);
				cell.setCellValue(new HSSFRichTextString(value));
				
				cell = row.createCell(2, HSSFCell.CELL_TYPE_STRING);
				cell.setCellStyle(styleCenter_N11);
				cell.setCellValue(new HSSFRichTextString(placementTest.getReceiptNo()));
				
				cell = row.createCell(3, HSSFCell.CELL_TYPE_STRING);
				cell.setCellStyle(styleLeft_N11);
				cell.setCellValue(new HSSFRichTextString(placementTest.getStudent().getFullName()));
				
				cell = row.createCell(4, HSSFCell.CELL_TYPE_NUMERIC);
				cell.setCellStyle(styleRight_N11);
				cell.setCellValue(placementTest.getFee());
				
				cell = row.createCell(5, HSSFCell.CELL_TYPE_STRING);
				cell.setCellStyle(styleLeft_N11);
				cell.setCellValue(new HSSFRichTextString(placementTest.getComment()));
				
				cell = row.createCell(6, HSSFCell.CELL_TYPE_STRING);
				cell.setCellStyle(styleCenter_N11);
				cell.setCellValue(new HSSFRichTextString(placementTest.getCashier().getFirstName()));
			}
			int lastRow = r + 1;
			
			r = r + 1;
			row = sheet.createRow(r);
			row.setHeightInPoints(18);
			
			cell = row.createCell(0, HSSFCell.CELL_TYPE_STRING);
			cell.setCellStyle(styleCenter_B12);
			cell.setCellValue(new HSSFRichTextString("TỔNG CỘNG"));
			sheet.addMergedRegion(new CellRangeAddress(r, r, 0, 3));
			
			cell = row.createCell(4, HSSFCell.CELL_TYPE_NUMERIC);
			cell.setCellStyle(styleCenter_B12_Numberic);
			if(lastRow >= firstRow) {
				cell.setCellFormula("SUM(E" + firstRow + ":"  + "E" + lastRow + ")");
			}
			
			r = r + 3;
			row = sheet.createRow(r);
			row.setHeightInPoints(18);
			
			cell = row.createCell(3, HSSFCell.CELL_TYPE_STRING);
			cell.setCellStyle(styleCenter_N12);
			cell.setCellValue(new HSSFRichTextString("Tp.Hồ Chí Minh, ngày " + day + " tháng " + (month + 1) + " năm " + year));
			sheet.addMergedRegion(new CellRangeAddress(r, r, 3, 6));

			r = r + 1;
			row = sheet.createRow(r);
			row.setHeightInPoints(18);
			
			cell = row.createCell(3, HSSFCell.CELL_TYPE_STRING);
			cell.setCellStyle(styleCenter_N12);
			cell.setCellValue(new HSSFRichTextString("Người nộp"));
			sheet.addMergedRegion(new CellRangeAddress(r, r, 3, 6));
			
			r = r + 5;
			row = sheet.createRow(r);
			row.setHeightInPoints(18);
			
			cell = row.createCell(3, HSSFCell.CELL_TYPE_STRING);
			cell.setCellStyle(styleCenter_N12);
			cell.setCellValue(new HSSFRichTextString(drpt));
			sheet.addMergedRegion(new CellRangeAddress(r, r, 3, 6));
			
			workbook.write(RESPONSE().getOutputStream());
		} catch(Exception ex) {
			ex.printStackTrace();
		}
		return NONE;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public String getFromTestDate() {
		return fromTestDate;
	}

	public void setFromTestDate(String fromTestDate) {
		this.fromTestDate = fromTestDate;
	}

	public String getToTestDate() {
		return toTestDate;
	}

	public void setToTestDate(String toTestDate) {
		this.toTestDate = toTestDate;
	}

	public String getFromConsultedDate() {
		return fromConsultedDate;
	}

	public void setFromConsultedDate(String fromConsultedDate) {
		this.fromConsultedDate = fromConsultedDate;
	}

	public String getToConsultedDate() {
		return toConsultedDate;
	}

	public void setToConsultedDate(String toConsultedDate) {
		this.toConsultedDate = toConsultedDate;
	}

	public Long getTypeId() {
		return typeId;
	}

	public void setTypeId(Long typeId) {
		this.typeId = typeId;
	}

	public Double getWrittenScore() {
		return writtenScore;
	}

	public void setWrittenScore(Double writtenScore) {
		this.writtenScore = writtenScore;
	}

	public Double getSpeakingScore() {
		return speakingScore;
	}

	public void setSpeakingScore(Double speakingScore) {
		this.speakingScore = speakingScore;
	}

	public Long getStudentId() {
		return studentId;
	}

	public void setStudentId(Long studentId) {
		this.studentId = studentId;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public Long getLevelId() {
		return levelId;
	}

	public void setLevelId(Long levelId) {
		this.levelId = levelId;
	}

	public Long getProgramId() {
		return programId;
	}

	public void setProgramId(Long programId) {
		this.programId = programId;
	}

	public Double getFee() {
		return fee;
	}

	public void setFee(Double fee) {
		this.fee = fee;
	}

	public Long getCashierId() {
		return cashierId;
	}

	public void setCashierId(Long cashierId) {
		this.cashierId = cashierId;
	}

	public String getConsultedDate() {
		return consultedDate;
	}

	public void setConsultedDate(String consultedDate) {
		this.consultedDate = consultedDate;
	}

	public Long getConsultantId() {
		return consultantId;
	}

	public void setConsultantId(Long consultantId) {
		this.consultantId = consultantId;
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public Long[] getIds() {
		return ids;
	}

	public void setIds(Long[] ids) {
		this.ids = ids;
	}

	public Long[] getLevelIds() {
		return levelIds;
	}

	public void setLevelIds(Long[] levelIds) {
		this.levelIds = levelIds;
	}

	public String[] getDates() {
		return dates;
	}

	public void setDates(String[] dates) {
		this.dates = dates;
	}

	public Double[] getWrittenScores() {
		return writtenScores;
	}

	public void setWrittenScores(Double[] writtenScores) {
		this.writtenScores = writtenScores;
	}

	public Double[] getSpeakingScores() {
		return speakingScores;
	}

	public void setSpeakingScores(Double[] speakingScores) {
		this.speakingScores = speakingScores;
	}

	public String getRegisterDate() {
		return registerDate;
	}

	public void setRegisterDate(String registerDate) {
		this.registerDate = registerDate;
	}

	public Long getPlacementShiftId() {
		return placementShiftId;
	}

	public void setPlacementShiftId(Long placementShiftId) {
		this.placementShiftId = placementShiftId;
	}

	public Long getPlacementTestTypeId() {
		return placementTestTypeId;
	}

	public void setPlacementTestTypeId(Long placementTestTypeId) {
		this.placementTestTypeId = placementTestTypeId;
	}	
}